<div class="public">
  <div style="margin-bottom: 8px;"><button nz-button (click)="change()">Switch Data</button></div>
  <nz-list *ngIf="data" [nzDataSource]="data" [nzRenderItem]="item" [nzItemLayout]="'horizontal'" [nzLoading]="loading"
    [nzSize]="large">
    <ng-template #item let-item>
      <nz-list-item>
        <div class="list-item">
          <div class="avatar">
            <img src="../../assets/public/yan-avatar.png" alt="头像失踪了">
          </div>
          <div class="item-content">
            <div class="title">{{item.title}}</div>
            <div class="content">{{item.content}}</div>
            <div class="operation-btn">
              <span><i nz-icon nzType="more" nzTheme="outline" style="color:blue;"></i></span>
              <span><i nzTheme="fill" style="color:red;" nz-icon nzType="like"></i></span>
              <span><i nz-icon nzType="message" nzTheme="outline"></i></span>
              <span>
                <a nz-popconfirm nzPopconfirmTitle="看不顺眼?" [nzIcon]="iconTpl" nzOkText="删掉" nzCancelText="忍一下"
                  nzPopconfirmPlacement="right" (nzOnConfirm)="confirmDelete(item)">
                  <i nz-icon nzType="delete" style="color:red;" nzTheme="outline"></i>
                </a>
                <ng-template #iconTpl>
                  <i nz-icon nzType="question-circle-o" style="color: red;"></i>
                </ng-template>
              </span>
            </div>
          </div>
        </div>
      </nz-list-item>
    </ng-template>
  </nz-list>
  <!-- <nz-empty *ngIf="!data"></nz-empty> -->
  <nz-skeleton *ngIf="!data" [nzAvatar]="true" [nzParagraph]="{ rows: 1 }"></nz-skeleton>
  <!-- </cdk-virtual-scroll-viewport> -->
  <app-add-article [visible]="visible" (closeAddModal)="closeModal($event)"></app-add-article>
  <div style="margin-top: 3px;">
    <nz-pagination [nzPageIndex]="pagination.page" [nzPageSizeOptions]="[1,3,5,10]" [nzTotal]="pagination.total"
      nzShowSizeChanger [nzPageSize]="pagination.prev" (nzPageIndexChange)="changePageIndex($event)"
      (nzPageSizeChange)="changePageSize($event)"></nz-pagination>
  </div>
</div>